package com.xhf.kl;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.TypedValue;
import android.view.Window;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.xhf.kl.utils.DensityUtils;
import com.xhf.kl.utils.StatusBarCompat;

public class FenxianActivity extends AppCompatActivity {
    private RelativeLayout rl_top_bg;
    private TextView tv_fenxian,tv_con_one,tv_con_two,tv_finish;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        supportRequestWindowFeature(Window.FEATURE_NO_TITLE);// 无标题
        setContentView(R.layout.activity_fenxian);
        StatusBarCompat.translucentStatusBar(this);//沉浸状态栏

        rl_top_bg= (RelativeLayout) findViewById(R.id.rl_top_bg);
        LinearLayout.LayoutParams linearParams =(LinearLayout.LayoutParams) rl_top_bg.getLayoutParams();
        linearParams.width = DensityUtils.getScreenWidth(FenxianActivity.this)/4*3;
//        linearParams.height = DensityUtils.getScreenHeight(FinishActivity.this)/4*3;
        rl_top_bg.setLayoutParams(linearParams); //动态设置二维码大小

        tv_fenxian= (TextView) findViewById(R.id.tv_fenxian);
        tv_fenxian.setTextSize(TypedValue.COMPLEX_UNIT_SP, DensityUtils.px2sp(FenxianActivity.this,60));
        tv_con_one= (TextView) findViewById(R.id.tv_con_one);
        tv_con_one.setTextSize(TypedValue.COMPLEX_UNIT_SP, DensityUtils.px2sp(FenxianActivity.this,48));
        tv_con_two= (TextView) findViewById(R.id.tv_con_two);
        tv_con_two.setTextSize(TypedValue.COMPLEX_UNIT_SP, DensityUtils.px2sp(FenxianActivity.this,48));
        tv_finish= (TextView) findViewById(R.id.tv_finish);
        tv_finish.setTextSize(TypedValue.COMPLEX_UNIT_SP, DensityUtils.px2sp(FenxianActivity.this,48));
    }
}
